12.12. Examples

The following is an unsuccessful request targeting an invalid resource.

>> Request <<

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header/>
  <SOAP-ENV:Body>
    <ns2:freebusyReport
          xmlns:ns2="http://docs.oasis-open.org/ws-calendar/ns/soap"
          xmlns:ns3="urn:ietf:params:xml:ns:icalendar-2.0">
      <ns2:href>/user/douglm/calendar</ns2:href>
      <ns2:time-range>
        <ns2:start>2011-04-01T04:00:00Z</ns2:start>
        <ns2:end>2011-04-30T04:00:00Z</ns2:end>
      </ns2:time-range>
    </ns2:freebusyReport>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

>> Response <<

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header/>
  <SOAP-ENV:Body>
    <ns2:freebusyReportResponse
          xmlns:ns2="http://docs.oasis-open.org/ws-calendar/ns/soap"
          xmlns:ns3="urn:ietf:params:xml:ns:icalendar-2.0">
      <ns2:status>Error</ns2:status>
      <ns2:message>Only principal href supported</ns2:message>
    </ns2:freebusyReportResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The following is an example of a request to retrieve Freebusy data for a user:

>> Request <<

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header/>
  <SOAP-ENV:Body>
    <ns2:freebusyReport
          xmlns:ns2="http://docs.oasis-open.org/ws-calendar/ns/soap"
          xmlns:ns3="urn:ietf:params:xml:ns:icalendar-2.0">
      <ns2:href>/principals/users/douglm</ns2:href>
      <ns2:time-range>
        <ns2:start>2011-04-01T04:00:00Z</ns2:start>
        <ns2:end>2011-04-30T04:00:00Z</ns2:end>
      </ns2:time-range>
    </ns2:freebusyReport>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

>> Response <<

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header/>
  <SOAP-ENV:Body>
    <ns2:freebusyReportResponse
          xmlns:ns2="http://docs.oasis-open.org/ws-calendar/ns/soap"
          xmlns:ns3="urn:ietf:params:xml:ns:icalendar-2.0">
      <ns2:status>OK</ns2:status>
      <ns3:icalendar>
        <ns3:vcalendar>
          <ns3:properties>
            <ns3:prodid>
              <ns3:text>//Bedework.org//BedeWork V3.7//EN</ns3:text>
            </ns3:prodid>
            <ns3:version>
              <ns3:text>2.0</ns3:text>
            </ns3:version>
          </ns3:properties>
          <ns3:components>
            <ns3:vfreebusy>
              <ns3:properties>
                <ns3:attendee>
                  <ns3:parameters>
                    <ns3:partstat>
                      <ns3:text>NEEDS-ACTION</ns3:text>
                    </ns3:partstat>
                  </ns3:parameters>
                  <ns3:cal-address>mailto:douglm@mysite.edu</ns3:cal-address>
                </ns3:attendee>
                <ns3:created>
                  <ns3:utc-date-time>2011-06-30T15:45:56Z</ns3:utc-date-time>
                </ns3:created>
                <ns3:dtend>
                  <ns3:date-time>2011-04-30T00:00:00Z</ns3:date-time>
                </ns3:dtend>
                <ns3:dtstamp>
                  <ns3:utc-date-time>2011-06-30T15:45:56Z</ns3:utc-date-time>
                </ns3:dtstamp>
                <ns3:dtstart>
                  <ns3:date-time>2011-04-01T00:00:00Z</ns3:date-time>
                </ns3:dtstart>
                <ns3:freebusy>
                  <ns3:parameters>
                    <ns3:fbtype>
                      <ns3:text>BUSY</ns3:text>
                    </ns3:fbtype>
                  </ns3:parameters>
                  <ns3:period>
                    <ns3:start>2011-04-06T15:00:00Z</ns3:start>
                    <ns3:end>2011-04-06T16:00:00Z</ns3:end>
                  </ns3:period>
                </ns3:freebusy>
                <ns3:last-modified>
                  <ns3:utc-date-time>2011-06-30T15:45:56Z</ns3:utc-date-time>
                </ns3:last-modified>
                <ns3:organizer>
                  <ns3:parameters/>
                  <ns3:cal-address>mailto:douglm@mysite.edu</ns3:cal-address>
                </ns3:organizer>
                <ns3:uid>
                  <ns3:text>2UTDVPZ9H0EQL9QISI44SP5IFPC4N75</ns3:text>
                </ns3:uid>
              </ns3:properties>
            </ns3:vfreebusy>
          </ns3:components>
        </ns3:vcalendar>
      </ns3:icalendar>
    </ns2:freebusyReportResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>